from selenium import webdriver


def open_browser(browser='chrome'):
    '''
    打开浏览器,返回driver对象
    :param browser:str
    :return:
    '''
    # 打开浏览器,设置driver
    if browser == 'chrome':
        return webdriver.Chrome()
    elif browser == 'firefox':
        return webdriver.Firefox()
    elif browser == 'edge':
        return webdriver.Edge()
    else:
        print('该浏览器不适配')
